<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Model\UserWalletRecordLog
 *
 * @property int $id
 * @property int|null $type 1：奖励金转入，2：克隆收益,3:体现失败，4：微信充值会员，5提现成功或者申请提现，6克隆支出，7开通会员，8平台充值会员
 * @property int|null $income_type 类型:1收入，0支出
 * @property int $user_id 会员id
 * @property float|null $money 收入或者支出的金额
 * @property int $relation_id 关联表id，比如类型是1的会员分销提成关联表是user_commission_details返佣表
 * @property string|null $describe 描述
 * @property \Illuminate\Support\Carbon|null $created_at 创建时间
 * @property \Illuminate\Support\Carbon|null $updated_at 修改时间
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereDescribe($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereIncomeType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereRelationId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserWalletRecordLog whereUserId($value)
 * @mixin \Eloquent
 * @property-read \App\Model\UserBonusTurnWalletLog $BonusTurnWalletLog
 */
class UserWalletRecordLog extends Model
{
    protected  $table = 'user_wallet_record_log';

    /**
     * 奖励金转入钱包记录表
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function BonusTurnWalletLog()
    {
        return $this->hasOne(UserBonusTurnWalletLog::class, "relation_id", "id");
    }

//    public function cloneLog()
//    {
//        return $this->hasMany()
//    }
}
